package br.com.test;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import br.com.entidade.Maquina;
@WebServlet("/cadastrar")
public class Cadastrar extends HttpServlet {

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		
		System.out.println("Cadastrar");
		Maquina maquina = new Maquina();
		maquina.setNome(req.getParameter("nome"));
		maquina.setMarca(req.getParameter("marca"));
		//maquina.setValor(Long.parseLong(req.getParameter("valor")));
		maquina.setStatus(req.getParameter("status"));
		maquina.setAlmox(req.getParameter("almox"));
		System.out.println(maquina);
		
		
	}

}
